// ICMP handling

#ifndef ICMP_H
#define ICMP_H

#include "adapt.h"

// ICMP type in packet header
#define TYPE_ICMP 1

// icmp header struct
struct icmpHeader_t
{
	uint8_t type;
	uint8_t code;
	uint16_t checksum;
	uint16_t id;
	uint16_t seq;
};

// icmp header type
typedef struct icmpHeader_t icmpHeader_t;

// handles an icmp packet
void handleIcmpPacket(ethernet_t *eth, packet_t *p);

// guess...
void Ping( unsigned int ip, int count, int timeout );

#endif // ICMP_H
